#ifndef _STRATEGY_H_
#define _STRATEGY_H_

#include <iostream>

using namespace std;
//////// public interface for sort algorithm strategys ////////

class Strategy
{
public:
	virtual int Sort(int arr[]) = 0;
};

//////// implemention of strategy  ////////

/* Straight Insertion Sort
  */
class StraInsStrategy:public Strategy
{
public:
	virtual int Sort(int arr[]);
};

/* Simple Selection Sort
  */
class SimpSelStrategy:public Strategy
{
public:
	virtual int Sort(int arr[]);
};

/* Bubble Sort
  */
class BubbStrategy:public Strategy
{
public:
	virtual int Sort(int arr[]);
};


/////// Client Context ////////

class Context
{
public:
	Context(Strategy *stra)
		:_strategy(stra)
	{}

	void SetStrategy(Strategy *stra) 
	{
		_strategy = stra;
	}

	int Sort(int arr[]);
private:
	Strategy *_strategy;
};

#endif
